import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { ChangeUserInfoPage } from './changeUserInfo';
import { NativeService } from '../../../service/NativeService';
import { HttpService } from '../../../service/httpService';
import { UserService } from '../../../service/userService'
@Component({
  selector: 'page-user-info',
  templateUrl: 'user-info.html',
})
export class UserInfoPage {

  constructor(public navCtrl: NavController,
              public http:HttpService,
              public nat:NativeService,
              public user:UserService,
              public navParams: NavParams) {

  }

  changeUserInfoAction(index){

    var obj = {};
    if (index == 1){
      obj = {"key":"生日"};
    }else if(index == 2){
      obj = {"key":"QQ",url:"/api/User/UpdateQQ"};
    }else if(index == 3){
      obj = {"key":"微信",url:"/api/User/UpdateWechat"};
    }else if(index == 4){
      obj = {"key":"手机号",url:"/api/User/UpdatePhone"};
    }else if(index == 5){
      obj = {"key":"邮箱",url:"/api/User/UpdateEmail"};
    }
    this.navCtrl.push(ChangeUserInfoPage,obj);
  }
}
